package com.zzc.service.impl;

import com.zzc.domain.AccessRecords;
import com.zzc.repository.AccessRecordsRep;
import com.zzc.service.AccessRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccessRecordsServiceImpl implements AccessRecordsService {

    @Autowired
    AccessRecordsRep accessRecordsRep;

    @Override
    public List<AccessRecords> getRecords() {
        Sort sort = Sort.by(Sort.Direction.ASC,"id");
        return accessRecordsRep.findAll(sort);
    }
}
